from tkinter import *

root = Tk()
root.title("ИТ марафон")
root.geometry("500x500")

canvas = Canvas(bg="white", width=500, height=500)
canvas.pack(anchor=CENTER, expand=1)

x=int(input("x= "))
y=int(input("y= "))
a=int(input("a= "))

canvas.create_polygon((x,y),(x+10*a,y),(x+10*a,y+10*a),(x+20*a,y+10*a),(x+20*a,y),(x+30*a,y),(x+30*a,y+20*a),(x,y+20*a),(x,y))

if a==0 and x>0 and y>0 and x+(30*a)<500 and y+(20*a)<500:
    pass
else:
    if a>0 and x>0 and y>0 and x+(30*a)<500 and y+(20*a)<500:
        pass
    else:
        if a<0 and x+(30*a)>0 and y+(20*a)>0 and x+(30*a)<500 and y+(20*a)<500:
            pass
        else:
            print("Ошибка")
            exit()



root.mainloop()